<script>
<!--
function goToAdmin() {
    top.location.href='<?php echo fb_url_for('@backoffice_list?page_id=',true) ?>' + $('#page_added').val();
}
-->
</script>

<?php
// users who have candidate_dataset and/or pages with Work for Us installed
?>
<div style="text-align:center">
    <div style="display:inline-block">
        <?php /* backoffice access to multiple pages */ ?>
        <?php if (count($pages) > 1): ?>
            <p class="message-blue font-size13"><?php echo __('You have installed the "%app_name%" app on multiple Pages.<br />Please select the Page you would like to administer now.', array('%app_name%' => 'Work for Us')) ?></p>
            <table align="center"><tr><td>
                <select id='page_added' class="fleft" style="display: block; font-size:22px; height : 33px; color : #333; max-width : 400px; outline-width : 0; margin : 0; margin-right:5px ">
                <?php foreach ($pages as $page_id => $page): ?>
                  <option value="<?php echo $page_id ?>"><?php echo $page['name'] ?></option>
                <?php endforeach ?>
                </select>
                <input type='button' class="fleft FB_button FB_buttonBlue fleft" style="font-size : 16px; padding : 4px 4px 5px; height : 33px;" value='Ok' onclick='goToAdmin()'>
            </td></tr></table>
        <?php endif ?>

        <!-- Install app on an other Page -->
        <p class="text-center"><a target="_parent" class="FB_button FB_buttonGreen FB_buttonSize13" href="<?php echo fb_url_for('@install_step1?ref=home',true) ?>"><?php echo __("Install the app on another Page") ?></a></p>

        <?php /* candidate access and optional backoffice access*/ ?>
    </div>
